public class code1_2 {
    //递归
    public ListNode reverseList(ListNode head) {
        //递归的出口
        if(head==null||head.next==null) {
            return head;
        }
        ListNode cur = reverseList(head.next);
        head.next.next = head;//5->4
        head.next = null;//给后面置空
        return cur;
    }
}
